<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>商品详情</title>
    <script src="/static/mobile/js/mui.min.js"></script>
    <link href="/static/mobile/css/mui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="/static/mobile/css/basic.css"/>
    <link rel="stylesheet" type="text/css" href="/static/mobile/css/produst_go.css"/>
    <link rel="stylesheet" type="text/css" href="/static/mobile/css/swiper.min.css"/>
	    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/static/admin/css/global.css" media="all">
    <link rel="stylesheet" href="/static/common/css/font.css" media="all">
	
    <script type="text/javascript" src="/static/mobile/js/jquery.js"></script>
    <script src="/static/mobile/js/swiper.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
      	mui.init();
    </script>
</head>
<body>
	<div class="sectionx">
		<header class="mui-bar mui-bar-nav" >
			<a class="mui-icon mui-icon-left-nav mui-pull-left" href="javascript:history.back(-1)" style="color: #4E4E4E;"></a>
			<h1 class="mui-title">商品详情</h1>
			<!--<a class="mui-icon mui-pull-right right1" href="javascript:;"><img src="images/nav_icon_share_w.png"/></a>-->
		</header>
	</div>
	<div class="section2">
		<div class="swiper-container">
		    <div class="swiper-wrapper">
				{$info.pics|picshow}

		
		    </div>
		
		    <div class="swiper-pagination"></div>
		</div>
	</div>
	
	<div class="section3">
		<div class="container">
			<p class="p1">{$info.title}</p>
			<p class="p2"><span class="s1">¥ {$info.jiage}</span><span class="s2">¥ {$info.jiage}</span></p>
		</div>
	</div>
	<div class="ge"></div>
	<div class="section4">
		<div class="container">
			<div class="section4-1">
				<p class="p1">商品详情</p>
			</div>
			<div class="section4-2">
				{$info.content|raw}
			</div>
		</div>
	</div>
	
	
	
	<div class="kong1"></div>
	<div class="gouwu">
		<div class="che">
			<a href="{:url('user/shop/listbuy')}">
				<img src="/static/mobile/images/b1.png"/>
				<p>购物车</p>
				<!--<span class="sss">{$shopzong}</span>--->
			</a>
		</div>
		<div class="jia">
			<a data={$info.id} id='buycar'>加入购物车</a>
		</div>
		<div class="mai">
			<a href="{:url('user/shop/buy',array('id'=>$info['id']))}">立即购买</a>
		</div>
	</div>
</body>
<script type="text/javascript" src="/static/plugins/layui/layui.js"></script>
<script>

		$(function(){
			
			$('#buycar').click(function(){
				var shopid=$('#buycar').attr("data");
				$.ajax({
						type : "post",  //请求方式
						url : "{:url('user/shop/buycar')}",  //请求路径
						dataType:"html",
						data :'shopid='+shopid,
						success : function(msg) {  //异步请求成功执行的回调函数
							if(msg==0){ 
							alert('请登录后操作');
							}
							if(msg==1){ 
							alert('成功加入购物车');
							}
							if(msg==2){ 
							alert('加入购物车失败');
							}
							if(msg==10){ 
							alert('已经加入过购物车');
							}
						}
				});
				
			
			
			})
	
		})
		
</script>
<script>
    var swiper = new Swiper('.swiper-container', {
        spaceBetween: 30,
        centeredSlides: true,
        autoplay: {
        delay: 2000,
        disableOnInteraction: false,
        },
        pagination: {
        el: '.swiper-pagination',
        clickable: true,
        },
    });
</script>
</html>